Unit FaturaBul;

Interface

Uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, ExtCtrls, cxControls, cxContainer, cxEdit,
  cxTextEdit, cxStyles, cxClasses, cxGridTableView, siComp;

Type
  TFaturaBulF = Class(TForm)
    btamam: TBitBtn;
    bvazgec: TBitBtn;
    Panel1: TPanel;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    bilisnok: TcxTextEdit;
    siparisNok: TcxTextEdit;
    FaturaNok: TcxTextEdit;
    Label4: TLabel;
    irsaliyenok: TcxTextEdit;
    Procedure FormClose(Sender: TObject; Var Action: TCloseAction);
    Procedure btamamClick(Sender: TObject);
    Procedure bvazgecClick(Sender: TObject);
    Procedure enter(Sender: TObject; Var Key: Char);
    Procedure FormKeyPress(Sender: TObject; Var Key: Char);
    Procedure bilisnokKeyDown(Sender: TObject; Var Key: Word;
      Shift: TShiftState);
    Procedure FormShow(Sender: TObject);
    Procedure siparisNokKeyDown(Sender: TObject; Var Key: Word;
      Shift: TShiftState);
    Procedure FaturaNokKeyDown(Sender: TObject; Var Key: Word;
      Shift: TShiftState);
    Procedure bilisnokEnter(Sender: TObject);
    Procedure siparisNokEnter(Sender: TObject);
    Procedure FaturaNokEnter(Sender: TObject);
    Procedure irsaliyenokKeyDown(Sender: TObject; Var Key: Word;
      Shift: TShiftState);
    Procedure irsaliyenokEnter(Sender: TObject);
  Private
    { Private declarations }
  Public
    { Public declarations }
  End;

Var
  FaturaBulF: TFaturaBulF;

Implementation
Uses data, ana1;
{$R *.dfm}

Procedure TFaturaBulF.FormClose(Sender: TObject; Var Action: TCloseAction);
Begin
  Action := CaFree;
End;

Procedure TFaturaBulF.btamamClick(Sender: TObject);
Begin
  Modalresult := mrok;
End;

Procedure TFaturaBulF.bvazgecClick(Sender: TObject);
Begin
  Modalresult := mrcancel;
End;

Procedure TFaturaBulF.enter(Sender: TObject; Var Key: Char);
Begin
  If key = #13 Then
    btamam.click;
End;

Procedure TFaturaBulF.FormKeyPress(Sender: TObject; Var Key: Char);
Begin
  If key = #27 Then
    bvazgec.click;
End;

Procedure TFaturaBulF.bilisnokKeyDown(Sender: TObject; Var Key: Word;
  Shift: TShiftState);
Begin
  If key = vk_down Then
  Begin
    siparisNok.setfocus;
  End;

End;

Procedure TFaturaBulF.FormShow(Sender: TObject);
Begin
  siparisNok.setfocus;
End;

Procedure TFaturaBulF.siparisNokKeyDown(Sender: TObject; Var Key: Word;
  Shift: TShiftState);
Begin
  If key = vk_up Then
  Begin
    BilisNok.setfocus;
  End;

  If key = vk_down Then
  Begin
    faturaNok.setfocus;
  End;

End;

Procedure TFaturaBulF.FaturaNokKeyDown(Sender: TObject; Var Key: Word;
  Shift: TShiftState);
Begin
  If key = vk_up Then
  Begin
    SiparisNok.setfocus;
  End;

  If key = vk_down Then
  Begin
    irsaliyenok.setfocus;
  End;
End;

Procedure TFaturaBulF.bilisnokEnter(Sender: TObject);
Begin
  FaturaNok.text := '';
  SiparisNok.text := '';
  irsaliyenok.text := '';
End;

Procedure TFaturaBulF.siparisNokEnter(Sender: TObject);
Begin
  BilisNok.text := '';
  FaturaNok.text := '';
  irsaliyenok.text := '';
End;

Procedure TFaturaBulF.FaturaNokEnter(Sender: TObject);
Begin
  BilisNok.text := '';
  SiparisNok.text := '';
  irsaliyenok.text := '';
End;

Procedure TFaturaBulF.irsaliyenokKeyDown(Sender: TObject; Var Key: Word;
  Shift: TShiftState);
Begin
  If key = vk_up Then
  Begin
    faturanok.setfocus;
  End;

  If key = vk_down Then
  Begin
    btamam.setfocus;
  End;

End;

Procedure TFaturaBulF.irsaliyenokEnter(Sender: TObject);
Begin
  BilisNok.text := '';
  FaturaNok.text := '';
  siparisnok.text := '';

End;

End.